﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Configuration;
using System.Data.SqlClient;

namespace Project.Master
{
    public partial class Goods_Order : System.Web.UI.Page
    {
        private String strConnString = ConfigurationManager.ConnectionStrings["DB_UdrinkConnectionString"].ConnectionString;
        ClassGet_ID classGet = new ClassGet_ID();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
               this.BindData();
            }
        }

       
        private void BindData()
        {

            GridView1.DataSource = classGet.GetIDEmp();
            GridView1.DataBind();
        }
      
        protected void BT_RunID_Click(object sender, EventArgs e)
        {
                int i;
                i = classGet.GetIDStock();
                string idGen = string.Format("STK{0:000}", i);
                HdfNO.Value = i.ToString();
                txtIDGen.Text = idGen;
            
        }

       

        protected void btSeachIDEmp_Click(object sender, EventArgs e)
        {

            
        }

        protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

        protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName == "cmdChoose")
            {
                txtfindEmpID.Text = e.CommandArgument.ToString();
                ModalPopupExtender1.CancelControlID = "lnkChoose";
            }
        }
    }
}